<!--
//==================================
//  Weather for google earth v1.0
//  更新时间: 2007-08-24
//  embont@gmail.com
//  www.dnxh.cn
//==================================
--><?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8"/>
<xsl:param name="ServerURL"/>
<xsl:template match="/">
		<xsl:variable name="hour" select="substring-before(/weather/loc/tm,':')"/>
		<xsl:variable name="dnFlag">
			<xsl:choose>
				<xsl:when test="contains(/weather/loc/tm,'AM')">
					<xsl:choose>
						<xsl:when test="($hour != 12) and ($hour &gt; 6)">d</xsl:when>
						<xsl:otherwise>n</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:when test="contains(/weather/loc/tm,'PM')">
					<xsl:choose>
						<xsl:when test="($hour = 12) or ($hour &lt; 7)">d</xsl:when>
						<xsl:otherwise>n</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
			</xsl:choose>
		</xsl:variable>
	<href><xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text><xsl:value-of select="$ServerURL"/>/img/icon/<xsl:choose><xsl:when test = "/weather/cc/icon = '-'">44d</xsl:when>	<xsl:otherwise><xsl:value-of select="/weather/cc/icon"/><xsl:value-of select="$dnFlag"/></xsl:otherwise></xsl:choose>.png<xsl:text disable-output-escaping="yes">]]&gt;</xsl:text></href>
</xsl:template>
</xsl:stylesheet>